package cn.zwx.util;

import java.util.concurrent.*;

/**
 * @author zhangwenxue
 */
public class DelegatedScheduledExecutorServiceImpl  extends DelegatedExecutorService implements ScheduledExecutorService {
    private final ScheduledExecutorService e;
    public DelegatedScheduledExecutorServiceImpl(ScheduledExecutorService executor) {
        super(executor);
        e = executor;
    }
    @Override
    public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) {
        return e.schedule(command, delay, unit);
    }
    @Override
    public <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit) {
        return e.schedule(callable, delay, unit);
    }
    @Override
    public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit) {
        return e.scheduleAtFixedRate(command, initialDelay, period, unit);
    }
    @Override
    public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) {
        return e.scheduleWithFixedDelay(command, initialDelay, delay, unit);
    }
}
